package com.itheima.controller;

import com.itheima.entity.Result;
import com.itheima.entity.StatusCode;
import com.itheima.service.SearchService1;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/search")
public class SearchSyncController {
    @Autowired
    private SearchService1 searchService1;
@RequestMapping("/importAll")
    public Result importAll(){
        searchService1.importAll();
        return new Result(true, StatusCode.OK,"操作成功","");
    }
}
